1. Field of the Invention
The present invention relates to a movie reproducing apparatus and method. More particularly, the present invention relates to a technique used for recovery from an error that occurred during reproduction processing.
2. Description of the Related Art
As a high-efficiency encoding format of movie data, there are known the Moving Picture Experts Group (MPEG) format and the next-generation H.264 format. Further, recording and reproducing apparatuses that record and reproduce movie data which has undergone compression coding by, for example, MPEG-2 are widely used.
The coding method of MPEG systems uses intra-frame coding that uses only the image data in a same frame for encoding and inter-frame prediction coding that uses a prediction error with a reference frame. For example, according to MPEG-2, coding processing that uses a combination of I picture that is intra-frame coded data, P picture that is forward predictive coding data, and B picture that is bidirectional predictive coding data is used.
Further, a structure called group of pictures (GOP) is introduced as a coding unit into coding standards such as MPEG-2. Generally, a GOP contains one I picture and a predetermined number of P and B pictures. The GOP begins with I picture in a coding order. I picture is followed by P pictures at a regular interval, and B pictures are in the remaining gaps. The encoding is performed in an order different from the order the frame is input (display order). For example, the pictures in the GOP is encoded in the order of I2, B0, B1, P5, B3, B4, P8, B6, B7, P11, B9, B10, P14, B12, and B13. The alphabets I, B, and P represent a picture type, and the figures represent the display order (the first picture is “0”). Although the above-described GOP structure is an example, generally, one GOP contains 15 frames. Further, I picture or P picture usually appears every three frames. Stream data including continuous GOPs is recorded in a recording medium by a recording and reproducing apparatus.
When the encoded movie data is reproduced, the encoded movie data is decoded in the order the data has been encoded. Then the order of the decoded data is changed and arranged into a display order. The frame images are output in this order. In this way, the reproduction display of the movie data is performed. For example, decoding is performed in the order of I2, B0, B1, P5, B3, B4, P8, B6, B7, P11, B9, B10, P14, B12, and B13 and display is performed in the order of B0, B1, I2, B3, B4, P5, B6, B7, P8, B9, B10, P11, B12, B13, and P14.
As described above, since the inter-frame prediction coding system is employed in the MPEG systems, if data error of a reproduction frame occurs, the number of the missing frames may not be limited to one frame. In other words, missing data of several consecutive frames may occur. Japanese Patent Application Laid-Open No. 2005-229395 discusses a measure that can be taken when an error of reproduced encoded movie data is detected. Japanese Patent Application Laid-Open No. 2005-229395 discusses a technique used in replacing encoded movie data in an error period with data of a normal frame image directly before the occurrence of the error.
The technique discussed in Japanese Patent Application Laid-Open No. 2005-229395 uses Decoding Time Stamp (DTS) that is a time stamp of the coded data which has been added to system data for the calculation of the error period. However, all encoded movie data does not always include time stamp information indicating coding time and display time represented by DTS. In fact, whether the time stamp information is included or not depends on the recording format of the encoded movie data. For example, the time stamp is defined to be essential for some of the formats used for recording coded data of MPEG-2 on a digital versatile disc (DVD). However, the time stamp is not essential for formats used in recording information on memory cards or hard disks. Thus, a large amount of movie data that does not include time stamp information exists.
If an error such as missing data occurs during reproduction of encoded movie data obtained from an arbitrary recording medium, and if the encoded data to be reproduced is in a format of encoded movie data that includes time stamp information discussed in Japanese Patent Application Laid-Open No. 2005-229395, the number of the missing frames and the frame which is currently being reproduced after the recovery from the error can be determined by referring to the time stamp information of the normal data after the error of the movie data has been recovered from the data missing error. Even if the format of the encoded movie data does not include time stamp information, the frame which is being reproduced can be determined by counting the frame numbers on condition that the reproduction is performed normally. However, once data missing occurs, even if the data missing is ended, the frame that is currently reproduced will be uncertain. At this time, if a time code (elapsed time information) of the reproduction data is displayed, when the data missing is ended, the continuity of the displayed time will be discontinued or a time code that does not correspond to the frame that is actually reproduced may be displayed. Further, even if the user desires to confirm the portion of the encoded movie data that has exhibited missing data when the data missing has occurred while the encoded movie data is being reproduced, if the time stamp information is not included, the user is unable to obtain the information as it is difficult to identifiably display the position and the number of the missing frames.